package ConveyorBelt.Util;

import org.newdawn.slick.Animation;
import org.newdawn.slick.SpriteSheet;

public class SheetUtil {
    public static Animation getAnimationFromSheet(SpriteSheet sheet, int rigaSheet, int startNumFramAnimazione, int numFramAnimazione) {
		Animation animation = new Animation();
		for (int frame = startNumFramAnimazione; frame < numFramAnimazione; frame++) {
		    animation.addFrame(sheet.getSprite(frame, rigaSheet), 150);
		}
		animation.setAutoUpdate(false);
		return animation;
    }
}
